﻿using System;
using System.ComponentModel.DataAnnotations;

namespace SimpleScrum.Core.Entities
{
    public class Users
    {
        private DateTime _joinDate = DateTime.Now;
        private DateTime _lastLogin = DateTime.Now;

        [Display(Name = "User ID")]
        public virtual Guid Id { get; set; }

        [Required]
        [DataType(DataType.Text)]
        [Display(Name = "Last Name")]
        public virtual string LastName { get; set; }

        [Required]
        [DataType(DataType.Text)]
        [Display(Name = "First Name")]
        public virtual string FirstName { get; set; }

        [Required]
        [DataType(DataType.EmailAddress)]
        [Display(Name = "Email")]
        public virtual string Email { get; set; }

        [Required]
        [DataType(DataType.Text)]
        [Display(Name = "Gender")]
        public virtual string Gender { get; set; }

        [Required]
        [DataType(DataType.DateTime)]
        [Display(Name = "Join Date")]
        public virtual DateTime JoinDate
        {
            get { return _joinDate; }
            set { _joinDate = value; }
        }

        [Display(Name = "Type")]
        public virtual int Type { get; set; }
        
        [Display(Name = "Status")]
        public virtual int Status { get; set; }

        [Required]
        [DataType(DataType.DateTime)]
        [Display(Name = "Last Login")]
        public virtual DateTime LastLogin
        {
            get { return _lastLogin; }
            set { _lastLogin = value; }
        }

        [Required]
        [Display(Name = "Default Project")]
        public virtual Project DefaultProject { get; set; }
        //public virtual UserProfile UserId { get; set; }
    }
}